//
//  YKSearchBar.m
//  youkan
//
//  Created by mac mini on 16/2/27.
//  Copyright © 2016年 Honsintech. All rights reserved.
//

#import "YKSearchBar.h"

@implementation YKSearchBar

-(instancetype)initWithFrame:(CGRect)frame{
    if(self=[super initWithFrame:frame]){
        self.font =[UIFont systemFontOfSize:13];
        self.background =[UIImage imageWithStretchableName:@"searchbar_textfield_background"];
        UIImageView *imageV=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"searchbar_textfield_search_icon"]];
        imageV.width+=10;
//        设置图片的方式
        imageV.contentMode = UIViewContentModeCenter;
        self.leftView = imageV;
//        左边图显示的模式
        self.leftViewMode = UITextFieldViewModeAlways;
    }
    return self;
}

@end
